import React ,{
  useState
} from 'react'

import './css/app.css'
import Son from './components/Son'
import Tab from './components/Tab'

function Hellow () {
  return <div>函数组件</div>
}


class HellowComponents extends React.Component{
  render() {
    return <div>class组件</div>
  }
}

function App() {

  let [str,setStr] = useState('123')
  let [arr,setArr] = useState([1,2,3])

  const parentbtn = (data) => {  //子父传参
    setArr(data)  
  }

  let my_son = {    //父子传参
    str,arr,parentbtn
  }
  return (
    <>  
     <div className='app'>App  
      <Son {...my_son}></Son>

      <Tab></Tab>
      <Hellow></Hellow>

      <HellowComponents></HellowComponents>
    </div>

    <div>44</div>
    </>
   
  )
}

export default App
